package prototype;

public class Square implements Shape {

    private int width;

    public void setWidth(int width) {
        this.width = width;
    }

    @Override
    public Object clone() {
        Square clone = null;
        try {
            clone = (Square) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return clone;
    }

    @Override
    public void draw() {
        System.out.println("Draw a square, width is " + width + ".");
    }
}
